﻿#ifndef MAINWIDGET_H
#define MAINWIDGET_H

#include <QWidget>
#include <QBarSet>
#include <QBarSeries>
#include <QChart>
#include <QChartView>
#include <QHBoxLayout>
#include <QVBoxLayout>
QT_CHARTS_USE_NAMESPACE

namespace Ui {
class MainWidget;
}

class MainWidget : public QWidget
{
    Q_OBJECT

public:
    explicit MainWidget(QWidget *parent = 0);
    ~MainWidget();

    //页面布局
    void InterfaceLayout();
    //绘制柱状图
    void DrawBarChart(int num1,int num2, int num3,int num4);

signals:
    void goSettingWidget();
    void goRecordWidget();
    void goPasswordWidget();
    void goSerialWindow();

private slots:
    void on_btn_setting_clicked();

    void on_btn_record_clicked();

    void on_btn_password_clicked();

    void on_btn_serial_clicked();

    void on_btn_submit_clicked();

private:
    Ui::MainWidget *ui;

    QBarSet *set0;
    QBarSeries *series;
    QChart *chart;
    QChartView *chartView;
    QHBoxLayout *HLayout;
    QVBoxLayout *VLayout;
    QHBoxLayout *HLayout2;
    QVBoxLayout *VLayout2;
};

#endif // MAINWIDGET_H
